package com.epic.rest;

import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;

@Path("/v1/task")
@Component("TaskResource")
public class TasksResources {
    @Path("test")
    @GET
    @Produces("application/json;charset=UTF-8")
    public String test(@Context HttpServletRequest request){
        try{
            return "hello process ok";
        }catch (Exception e){
        }
        return "error";
    }
}
/**
 * 1.要查询每个用户的task 使用 select owner_,assignee_ from  act_ru_task where assignee_ = 'xxx';
 *  Camunda 是通过 select id_,group_id_,user_id_,task_id_ from act_ru_identitylink; 查看到task,然后再查询对应的task 详情
 *  但是要通过identitylink 近行关联, 主要是通过Camunda的Moder 是怎么把task id 给用户关联上的。(猜测可能是创建User Task时根据 指定的参数
 *  生成对应的link task user记录)
 *  curl http://localhost:8060/engine/api/v1/task/test
 *  ll  webapps/engine
 *  META-INF
 *  WEB-INF
 *  如果要去掉engine 需要改下war的部署方式
 *  mv -f /opt/remote/auth-rest/target/auth*.war webapps/engine/ROOT.war
 *  demo:
 *  mv -f /opt/remote/rest/target/rest*.war /opt/epic/espc/platform/rest/ROOT.war
 * mv -f /opt/remote/auth-rest/target/auth*.war /opt/epic/espc/platform/proxy/ROOT.war
 * server.xml 然后自动加载
 *       <Host name="localhost"  appBase="/opt/epic/espc/platform/rest"
 *             unpackWARs="true" autoDeploy="true">
 *
 *
 *
 *
 */
